package cn.edu.eight.food.service.Impl;

import cn.edu.eight.food.dao.OfCommentMapper;
import cn.edu.eight.food.model.OfComment;
import cn.edu.eight.food.service.ofCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class ofCommentServiceImpl implements ofCommentService {
    @Autowired
    OfCommentMapper ofCommentMapper;

    @Override
    public int insert(OfComment record) {
        return ofCommentMapper.insert(record);
    }

    @Override
    public List<OfComment> findByFoodId(String foodId) {
        return ofCommentMapper.findByFoodId(foodId);
    }

    @Override
    public List<Map> findCommentAll() {
        return ofCommentMapper.findCommentAll();
    }
}
